Bulk update of vehicles
This request updates information about several vehicles.
Request syntax
POST https://b2b-api.go.yandex.ru/integration/2.0/vehicles/bulk-update
Request headers
Authorization: Bearer <OAuth-token>
OAuth access token. The steps to get a token are described in Getting started.
X-YaTaxi-Selected-Corp-Client-Id— client ID from the account. Required if multiple clients are available using the token.
X-Idempotency-Token— idempotency token, a string using UUID format. One idempotency token corresponds to one order; a new order requires generating a new token. Required header.
Request body
Data is transmitted in JSON format:
| Field | Description | Format | Required |
|---|---|---|---|
vehicles |
Vehicle object array with data for each vehicle. | Array | Yes |
Structure of the vehicles array element:
| Field | Description | Format | Required |
|---|---|---|---|
vehicle_id |
Unique vehicle ID. | String | Yes |
license_plate |
New vehicle license plate number. | String | Yes |
model |
New vehicle model. | String | Yes |
limit_id |
New refuel limit. | String | Yes |
access_type |
Access type Possible values: anyone or custom. |
String | Yes |
access |
Array of access rights. | Array | No |
Structure of the acccess array element:
| Field | Description | Format | Required |
|---|---|---|---|
entity_type |
Access subject type. Possible values: user, department. |
String | Yes |
entity_id |
User or department ID | String | Yes |
Response field description
Successful response doesn't contain a body (returns status 200 OK).
Request example
POST https://b2b-api.go.yandex.ru/integration/2.0/vehicles/bulk-update
Authorization: Bearer <OAuth token>
X-YaTaxi-Selected-Corp-Client-Id: <client-id>
X-Idempotency-Token: <token>
{
"vehicles": [
{
"vehicle_id": "7ea0b85f04c9469e9fb039b3515975e9",
"license_plate": "М200ММ199",
"model": "Gazelle Next5",
"limit_id": "7715b673f26a4785bfe11639c9b0d4b6",
"access_type": "custom",
"access": []
}
]
}
Response example
{ }
Possible response codes
200— updated400— error validating parameters404— car not found409— conflict (for example, duplicate vehicle license plate number)503— server error